<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    // function fn (x = 1, y = 2) {
    //   let x = 1
    //   const y = 1
    // }
    // fn(20, 30)
    function m1 ({ x = 0, y = 0 } = {}) {
      return [x, y]
    }
    function m2 ({ x, y } = { x: 0, y: 0 }) {
      return [x, y]
    }
    let m11 = m1({})
    let m22 = m2({})
    console.log(m11);
    console.log(m22);
  </script>
</body>

</html>